package cn.jiadakeji.parent.config.security;

import cn.jiadakeji.parent.dto.CustomerJwtDTO;
import io.netty.util.concurrent.FastThreadLocal;

/**
 * @author hhaoyu
 */
public class CustomerContext {

    private static FastThreadLocal<CustomerJwtDTO> threadLocal = new FastThreadLocal<CustomerJwtDTO>();

    public static void put(CustomerJwtDTO customerJwtDTO) {
        threadLocal.set(customerJwtDTO);
    }

    public static CustomerJwtDTO get() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }
}
